home *** CD-ROM | disk | FTP | other *** search
/ Internet Tools (InfoMagic) / Internet Tools.iso / dos_win / winsock / maillist / 94-05.Z / 94-05 / 000364_news@bigblue.oit.unc.edu_Sun May 25 18:05:01 1994.msg < prev    next >
Internet Message Format  |  1994-05-31  |  5KB

  1. Received: from bigblue.oit.unc.edu by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
  2.           id AA29705; Wed, 25 May 1994 14:55:31 -0400
  3. Received: by bigblue.oit.unc.edu (AIX 3.2/UCB 5.64/4.03)
  4.           id AA10137; Wed, 25 May 1994 14:33:19 -0400
  5. Received: from GATEWAY by bigblue with netnews
  6.     for winsock@sunsite.unc.edu (winsock@sunsite.unc.edu)
  7. To: winsock@sunsite.unc.edu
  8. Date: 25 May 1994 18:05:01 GMT
  9. From: larsenc@lcs.com (Craig Larsen)
  10. Message-Id: <2s040d$6uf@herald.indirect.com>
  11. Organization: Larsen Consulting and Sales  (602) 548-1542
  12. Sender: ses
  13. Subject: Winsock Application FAQ Available
  14.  
  15.  
  16.  
  17. If you are trying to find a certain Winsock Application, you need the
  18. Winsock Application FAQ.
  19.  
  20.  
  21. Send email to:  info@lcs.com     Subject: FAQ
  22.  
  23. or
  24.  
  25. Point your WWW client at:  http://www.ramp.com/~lcs
  26.  
  27.  
  28.  
  29.  
  30.  
  31. Larsen Consulting and Sales
  32. Hard Drives, CD-ROM Drives, Modems and More !
  33. From news@bigblue.oit.unc.edu Wed May 25 14:55:35 1994
  34. Received: from bigblue.oit.unc.edu by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
  35.           id AA29729; Wed, 25 May 1994 14:55:35 -0400
  36. Received: by bigblue.oit.unc.edu (AIX 3.2/UCB 5.64/4.03)
  37.           id AA32488; Wed, 25 May 1994 14:42:27 -0400
  38. Received: from GATEWAY by bigblue with netnews
  39.     for winsock@sunsite.unc.edu (winsock@sunsite.unc.edu)
  40. To: winsock@sunsite.unc.edu
  41. Date: Wed, 25 May 1994 14:07:58
  42. From: GREG_KAISEN@quickmail.cis.yale.edu (Greg Kaisen)
  43. Message-Id: <GREG_KAISEN.23.000E226E@QM.YALE.EDU>
  44. Organization: Yale University
  45. Sender: ses
  46. Subject: Microsoft Daytona TCP-IP name resolution ques.
  47.  
  48. Using the Microsoft "Daytona TCP/IP" and WFW 3.11 and ODI drivers..... I find 
  49. that if I telnet to a local host by only specifying the Host name (ie:YALEVM) 
  50. , I get rejected saying "Unable to resolve hostname" however if I telnet to 
  51. (ie: YALEVM.YCC.YALE.EDU) i am able to connect.
  52.  
  53. I had thought that by configuring the Domain Name Servers, and by specifying 
  54. the default domain name (ie: YCC.YALE.EDU) - which I did after "adding a 
  55. protocol" I would be able to connect via the Hostname only?
  56.  
  57. This is how the Trumpet Winsock handles things, what might I be missing?  
  58. should there be some sort of HOSTS file in the Windows directory?
  59.  
  60. -thanks,  Greg_Kaisen@QUICKMAIL.YALE.EDU
  61. From news@bigblue.oit.unc.edu Wed May 25 18:15:54 1994
  62. Received: from bigblue.oit.unc.edu by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
  63.           id AA29762; Wed, 25 May 1994 14:55:44 -0400
  64. Received: by bigblue.oit.unc.edu (AIX 3.2/UCB 5.64/4.03)
  65.           id AA21742; Wed, 25 May 1994 14:42:56 -0400
  66. Received: from GATEWAY by bigblue with netnews
  67.     for winsock@sunsite.unc.edu (winsock@sunsite.unc.edu)
  68. To: winsock@sunsite.unc.edu
  69. Date: Wed, 25 May 1994 18:15:54 GMT
  70. From: gsegalli@ic1d.harris.com (Greg Segallis)
  71. Message-Id: <CqDEqJ.DqA@news.ess.harris.com>
  72. Organization: Harris, GCSD
  73. Sender: ses
  74. Subject: winsock programming problem
  75.  
  76. I am just starting out with winsock programming and I'm having problems.
  77. At this point I am just trying to establish a connection with a host
  78. (IP = 130.41.1.250).  I am using the following pascal code and I get 
  79. an error # 10047 on the bind command (I get the same error if I replace
  80. the bind with a connect).  This error, WSAEAFNOSUPPORT, means the
  81. specified address family is not supported by this protocol.  I have
  82. verified that several other working winsock apps doexactly the same
  83. winsock calls with the same parameters to the the socket call.  I suspect
  84. there is something wrong with the name parameter I am supplying to bind.
  85. The pascal header is a little different than the C header concerning the
  86. 'sockaddr' format - the pascal just shows it as a family followed by 14
  87. bytes of data.  I am filling them like the 'sockaddr_in' format - a
  88. 2 byte port, 4 byte IP address, 8 bytes of ZERO (?).
  89.  
  90. Thanks for any help you can give.
  91.  
  92. Greg
  93.  
  94.  
  95. program wsocktst;
  96.  
  97. uses winsock, wincrt;
  98.  
  99. var
  100.   i:            integer;
  101.   wsadata:      lpwsadata;
  102.   skt:          socket;
  103.   socka:        sockaddr;
  104.   psocka:       psockaddr;
  105.  
  106.  
  107. begin
  108.   socka.sa_family := AF_INET;
  109.   socka.sa_data[0] := #25;            {these next two bytes should be the SMTP port}
  110.   socka.sa_data[1] := #0;            { (I also tried 119)}
  111.  
  112.   socka.sa_data[2] := #130;        {the next four bytes are the IP address}
  113.   socka.sa_data[3] := #41;
  114.   socka.sa_data[4] := #1;
  115.   socka.sa_data[5] := #250;
  116.  
  117.   for i := 6 to 13 do            {don't know what these are for}
  118.     socka.sa_data[i] := #0;
  119.  
  120.   i := wsastartup(257,@wsadata);
  121.   writeln('WSAStartup = ',i);        {this gives me a return code of 0, so far so good}
  122.  
  123.   skt := _socket(2,1,0);
  124.   writeln('Socket = ',skt);            {this gives me a return code of 1, still OK}
  125.  
  126.   i := bind(skt,socka,16);
  127. {  i := connect(skt,socka,16);     both give the same result}
  128.   writeln('Bind = ',i);            {this gives me an error response of -1}
  129.  
  130.   if i <> 0 then
  131.     i := wsagetlasterror;
  132.   writeln('Bind Error = ',i);        {the actual error code is 10047}
  133.  
  134.   WSACleanup;
  135.  
  136. end.